package cn.kimming.rpc.remoting.proxy.cglib;

import cn.kimming.rpc.remoting.client.RpcClient;
import net.sf.cglib.proxy.Enhancer;


public class CglibRpcClientProxyFactory {
    public static Object getRpcClientProxy(Class<?> type, RpcClient rpcClient) {
        Enhancer enhancer =new Enhancer();
        enhancer.setSuperclass(type);
        enhancer.setCallback(new CglibRpcClientInterceptor(rpcClient));
        return enhancer.create();
    }
}
